<!--
    使用示例：
    <ToggleTheme/>
-->

<template>
  <div>
    <el-switch
        v-model="themeStore.isDark"
        :active-icon="Moon"
        :inactive-icon="Sunny"
        inline-prompt
        @change="themeStore.toggleDark"
    />
  </div>
</template>

<script setup>
// 主题切换
import { Sunny, Moon } from "@element-plus/icons-vue";
import { useThemeStore } from "@/stores/theme";

const themeStore = useThemeStore();
</script>

<style scoped>

</style>
